package com.night.icm.model.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 全局参数配置信息
 *
 * @author Liao ZhiYong
 * @date 2020/1/24
 */
@ApiModel(description = "全局参数配置信息")
@Data
@ToString()
@EqualsAndHashCode(of = {"id"}, callSuper = false)
public class ConfigurationInfoDTO {

    @ApiModelProperty(position = 1, value = "对象ID，新增时应当为null, 系统会自动生成", required = true)
    private String id;

    @ApiModelProperty(position = 100, value = "配置名称（唯一）", required = true)
    @NotNull
    @Size(max = 100)
    private String name;

    @ApiModelProperty(position = 110, value = "配置值", required = true, allowEmptyValue = true)
    @Size(max = 100)
    private String value;

    @ApiModelProperty(position = 111, value = "是否系统初始化的数据，如果为是，通常不允许修改和删除", required = true)
    @NotNull
    private Boolean systemInitialized;

    @ApiModelProperty(position = 120, value = "是否可用", required = true)
    @NotNull
    private Boolean available;

    @ApiModelProperty(position = 130, value = "备注")
    @Size(max = 500)
    private String remark;

    @ApiModelProperty(position = 140, value = "显示顺序", required = true)
    private Integer showOrder;
}